import { createApp, h } from 'vue';
import App from './App.vue';
import store from './store';
import router from './router';
/**注册ui */
import ElementPlus, { ElEmpty } from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
/** 全局页面路由权限注册 */
import '@/utils/permission';
import 'nprogress/nprogress.css'; // 进度条样式
// 注册 vxe-table
import VxeUITable from 'vxe-table';
import 'vxe-table/lib/style.css';
import 'vxe-pc-ui/lib/style.css';
import '@/styles/index.less';
import VxeUIAll from 'vxe-pc-ui';
import 'xe-utils';
// 自定义组件
import SysComponents from '@/components/index';
// 创建vue实例
const app = createApp(App);
// VXETable 配置
VxeUITable.renderer.add('ElEmpty', {
  renderEmpty: () =>
    h(
      'div',
      { style: { padding: '15px' } },
      h(ElEmpty, { description: '暂无数据' })
    )
});
// ---end---
app.use(store);
app.use(router);
app.use(VxeUIAll);
app.use(VxeUITable);
app.use(ElementPlus, { locale: zhCn });
app.use(SysComponents);
// 挂载实例
app.mount('#app');
